package com.rgs.gateway.authentication.feignclient.client;

import com.rgs.gateway.common.pojo.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author RenGaoshuai
 * @date 2024/6/28 10:05
 * @description
 */
@FeignClient(value = "authentication-server")
public interface AuthFeignClient {
    /**
     * 调用签权服务，判断用户是否有权限
     */
    @PostMapping(value = "/auth/permission")
    Result<Boolean> permission(@RequestHeader("appKey") String appKey, @RequestParam("url") String url, @RequestParam("method") String method);

    /**
     * 获取用户信息
     */
    @PostMapping(value = "/auth/getUserInfo")
    Result authUserInfo(@RequestParam("appKey") String appKey);

}
